package GUI;

import java.applet.Applet;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Toolkit;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JButton;
import javax.swing.JLabel;

import java.text.SimpleDateFormat;
import java.util.*;
import java.awt.Canvas;
public class Alarm extends JFrame {

	private JPanel contentPane;
	private Image img;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Alarm frame = new Alarm();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public Alarm() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 840, 640);
		contentPane = new JPanel(){
			public void paintComponent(Graphics g){
				Image image = new ImageIcon("alarm.png").getImage();
				g.drawImage(image, 0, 0, this);
			}		
		};
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JPanel panel_1 = new JPanel();
		panel_1.setOpaque(false);
		panel_1.setBounds(200, 268, 450, 200);
		contentPane.add(panel_1);
		panel_1.setLayout(null);
		
		String curDate = new SimpleDateFormat("yyyyMMddhhmmss").format(new Date());
		
		
		JLabel lblCurrentTime = new DigitalClock();
		lblCurrentTime.setBounds(197, 35, 125, 38);
		panel_1.add(lblCurrentTime);
		
		JLabel lblNextMeeting = new JLabel("GetNextMeeting");
		lblNextMeeting.setBounds(197, 83, 200, 50);
		panel_1.add(lblNextMeeting);
		
		JButton btnConfirm = new JButton("Confirm"){
			public void paintComponent(Graphics g){
				Image image = new ImageIcon("iconconfirm.png").getImage();
				g.drawImage(image, 0, 0, this);
			}		
		};
		btnConfirm.setBorder(null);
		btnConfirm.setBounds(200, 478, 220, 40);
		contentPane.add(btnConfirm);
		
		JButton btnSnooze = new JButton("Snooze"){
			public void paintComponent(Graphics g){
				Image image = new ImageIcon("iconsnooze.png").getImage();
				g.drawImage(image, 0, 0, this);
			}		
		};
		btnSnooze.setBorder(null);
		btnSnooze.setBounds(430, 478, 220, 40);
		contentPane.add(btnSnooze);
		
		
	}
}
